<template>
<div id="search_container">
  <el-row :gutter="10">
    <el-col :span="7">
      <el-input class="el-input" placeholder="请输入要查询的地址" type="text" v-model="userInput" :id="inputId"></el-input>
    </el-col>
    <el-col :span="5">
      <el-button  type="primary" id="searchPlaceInput" @click="send">查询</el-button>
    </el-col>
  </el-row>
</div>
</template>

<script>

export default {
  name: "search",
  data(){
    return{
      userInput:null,
      inputId:"searchInput"
      // inputObject:{
      //   userInput:null,
      //   inputId:'searchInput'
      // }
    }
  },
  methods:{
   send(){
       this.$emit('searchPlaceInput',{userInput:this.userInput,inputId:this.inputId})
      // console.log(this.inputObject)
    }
  },
  mounted() {
    this.send()
  }
}
</script>

<style scoped>

.el-input{
  width: 400px;
}
</style>